import { Menu } from 'antd';
import { MailOutlined, ShopOutlined, SettingOutlined } from '@ant-design/icons';
import React from 'react';
import { Layout } from 'antd';
import '../../scss/fp/index.scss'
import { useNavigate , Outlet} from 'react-router-dom';
const { Header, Footer, Sider, Content } = Layout;

function FpRouter(props) {
    //-------------------------------------------☃️---`--以 key 属性值跳转路由-----☃️-------------------------------------------
    
    var push = useNavigate();
    
    const goKeyrouter = function({ item, key, keyPath, domEvent }) {
        //-----🍌---🍌---🍌-----
        push(key);
    }
    
    //-------------------------------------------☃️-----以 key 属性值跳转路由-----☃️-------------------------------------------
    
    return (
        <div>
           <Menu theme='dark' mode="inline" defaultSelectedKeys={['key']}>
                <Menu.SubMenu onClick={ goKeyrouter } key="SubMenu" title="商品管理" icon={<ShopOutlined />}>
                    <Menu.Item key="/index/shoppingcart" >
                        商品列表
                    </Menu.Item>
                    <Menu.Item key="/index/jiageben" >
                        商品价格本
                    </Menu.Item>
                    <Menu.Item key="/index/callectshopping" >
                        商品分类编辑
                    </Menu.Item>
                </Menu.SubMenu>
            </Menu>
        </div>
    );
}

export default FpRouter;